/**
 * $Id: SoftwareEngineerTest.java 81 2012-12-13 16:34:51Z Denis.Skalsky@gmail.com $
 */
package com.globallogic.skalskyy.javabasic.valstaff;

import static org.junit.Assert.assertEquals;

import org.junit.Test;

public class SoftwareEngineerTest extends StaffTestFixture {
	
	@Test
	public void testGetToString() {		
		assertEquals("Denys Skalskyy, senior software engineer", this.DenysSkalskyy.toString());
	}
	
	@Test
	public void testEqualsOneself() {
		assertEquals(true, this.DenysSkalskyy.equals(this.DenysSkalskyy)); 
	}

	@Test
	public void testEqualsDifferentClass() {
		assertEquals(false, this.DenysSkalskyy.equals(new Object()));
	}
	
	@Test
	public void testEqualsDeveloper() {
		SoftwareEngineer dev = new SoftwareEngineer();
		dev.setFirstName("Denys");
		dev.setSecondName("Skalskyy");
		dev.setPosition("senior software engineer");
		dev.setDateOfBirth("16 September");
		dev.setLanguage("java");
		
		assertEquals(true, this.DenysSkalskyy.equals(dev));
	}
	
	@Test
	public void testEqualsDeveloperWithDifferentLanguage() {
		SoftwareEngineer dev = new SoftwareEngineer();
		dev.setFirstName("Denys");
		dev.setSecondName("Skalskyy");
		dev.setPosition("senior software engineer");
		dev.setDateOfBirth("16 September");
		dev.setLanguage("C#");
		
		assertEquals(false, this.DenysSkalskyy.equals(dev));		
	}
}